package ua.com.minus1.lookbattle;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.AttributeSet;
import android.view.View;
import ua.com.minus1.lookbattle.utils.AppPreferences;

/**
 * Created with IntelliJ IDEA.
 * User: Denis
 * Date: 06.10.12
 * Time: 10:53
 * To change this template use File | Settings | File Templates.
 */
public class LoginActivity extends FragmentActivity implements LoginFragment.Callbacks {

    private AppPreferences mPreferences;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);

        mPreferences = new AppPreferences(this);
    }

    public void onRegister(boolean success) {
        if (success) {
            mPreferences.setRegistered(true);

            //Bundle extras = getIntent().getExtras();
            Intent intent = new Intent(this, LooksActivity.class);
            intent.putExtras(getIntent());
            startActivity(intent);
        } else
            finish();
    }
}
